If (Simple Statement)
A simple If statement contains one Boolean expression and a statement to be executed if the value of the Boolean expression istrue
.SYNTAX
if Boolean then statementwhereBoolean is an expression whose value is
true
orfalse
.statement is any AppleScript statement.
EXAMPLES
In the following If statement
if result > 3 then display dialog "The result is " & ÿ result as stringthe Display Dialog command is executed only if the value of the Boolean expressionresult > 3
istrue
.